@@ -45,9 +45,13 @@ def complement_code_list(request): |
||
45 | 45 |
type_ = request.POST.get('type', '') |
46 | 46 |
|
47 | 47 |
logs = ComplementCodeLogInfo.objects.filter(user_id=user_id, status=True) |
48 |
- if type_ == 'pass': |
|
48 |
+ if type_ == 'todo': |
|
49 |
+ logs = logs.filter(audit_status=ComplementCodeLogInfo.AUDIT_TODO) |
|
50 |
+ elif type_ == 'pass': |
|
49 | 51 |
logs = logs.filter(audit_status=ComplementCodeLogInfo.AUDIT_PASS) |
50 |
- logs = logs.order_by('-pk') |
|
52 |
+ elif type_ == 'refused': |
|
53 |
+ logs = logs.filter(audit_status=ComplementCodeLogInfo.AUDIT_REFUSED) |
|
54 |
+ logs = logs.order_by('audit_status', '-pk') |
|
51 | 55 |
|
52 | 56 |
logs, left = pagination(logs, page, num) |
53 | 57 |
logs = [log.data for log in logs] |
@@ -117,13 +117,13 @@ class MchSearchModelAndCameraLogInfo(BaseModelMixin): |
||
117 | 117 |
|
118 | 118 |
class ComplementCodeLogInfo(BaseModelMixin): |
119 | 119 |
AUDIT_TODO = 0 |
120 |
- AUDIT_REFUSED = -1 |
|
121 | 120 |
AUDIT_PASS = 1 |
121 |
+ AUDIT_REFUSED = 10 |
|
122 | 122 |
|
123 | 123 |
AUDIT_STATUS_TUPLE = ( |
124 | 124 |
(AUDIT_TODO, u'待审核'), |
125 |
- (AUDIT_REFUSED, u'审核不通过'), |
|
126 | 125 |
(AUDIT_PASS, u'审核通过'), |
126 |
+ (AUDIT_REFUSED, u'审核不通过'), |
|
127 | 127 |
) |
128 | 128 |
|
129 | 129 |
user_id = models.CharField(_(u'user_id'), max_length=32, blank=True, null=True, help_text=u'用户唯一标识', db_index=True) |